package com.zenithmind.mall.pojo.dto;

import lombok.Data;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.DecimalMin;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 秒杀商品DTO
 * 
 * @author ZenithMind Team
 * @since 2025-07-03
 */
@Data
public class SeckillProductDTO {

    /**
     * 秒杀活动ID
     */
    @NotBlank(message = "秒杀活动ID不能为空")
    private String activityId;

    /**
     * 商品ID
     */
    @NotBlank(message = "商品ID不能为空")
    private String productId;

    /**
     * 秒杀价格
     */
    @NotNull(message = "秒杀价格不能为空")
    @DecimalMin(value = "0.01", message = "秒杀价格必须大于0")
    private BigDecimal seckillPrice;

    /**
     * 原价
     */
    @NotNull(message = "原价不能为空")
    @DecimalMin(value = "0.01", message = "原价必须大于0")
    private BigDecimal originalPrice;

    /**
     * 秒杀库存
     */
    @NotNull(message = "秒杀库存不能为空")
    @Min(value = 1, message = "秒杀库存必须大于0")
    private Integer seckillStock;

    /**
     * 限购数量
     */
    @Min(value = 1, message = "限购数量必须大于0")
    private Integer limitPerUser;

    /**
     * 秒杀开始时间
     */
    private LocalDateTime startTime;

    /**
     * 秒杀结束时间
     */
    private LocalDateTime endTime;

    /**
     * 排序号
     */
    private Integer sortOrder;

    /**
     * 是否启用
     */
    private Integer enabled;
}
